<?php

namespace common\model;

use think\model\RelationModel;

class UserFavoritesModel extends RelationModel
{
    //自动完成
    protected $_auto = [
        ['create_time', 'time', self::MODEL_INSERT, 'function'],
        ['update_time', 'time', self::MODEL_INSERT, 'function']
    ];

    // 自动验证
    protected $_validate = [
        ['user_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
    ];
}
